<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String url = request.getScheme() + "://" + request.getServerName()
			+ request.getRequestURI();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<title>新增资产</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

		<%@ include file="/html/custom/header.jsp"%>

		<link type="text/css" href="<%=basePath%>/html/css/gm/asset.css"
			rel="stylesheet" />

		<script type="text/javascript"
			src="<%=basePath%>html/js/swss.asset.js"></script>
	</head>

	<body>
		<!-- 导航 -->
		<s:action name="showTopNav" executeResult="true" namespace="/user"></s:action>

		<div id="content">
			<div class="ast">
				<form id="astForm" action="/swss/asset/ast_save.action"
					method="post" enctype="multipart/form-data">
					<div class="ast-title">新增资产
						<span> <!-- 单据号:<s:property value="#request.asset.danJuNo" /> -->
							<input id="txtBillNo" type="hidden" name="asset.danJuNo"
								value="<s:property value="#request.asset.danJuNo" />" /> </span>
					</div>
					<div class="ast-light">
						<div class="pc">
							<label>
								成批条数
							</label>
							<input type="text" class="ui-widget-content ui-corner-all txt"
								name="asset.batchCount" value="1" />
						</div>

						<div class="jzr">
							记账人:
							<s:property value="#request.user.accperName" />
							<input type="hidden" name="asset.accperName" value="<s:property value="#request.user.accperName" />" />
							<input type="hidden" name="asset.inPeople" value="<s:property value="#request.user.accperName" />" />
						</div>
						<div class="date">
							录入时间:
							<s:property value="#request.date" />
							<input type="hidden" name="astType" value="S" />
						</div>
					</div>
					<div class="ast-form ui-widget-content ">
						<div class="clearfix">
							<div class="panel left">
								<table>
									<tr>
										<td>
											国标类号
											<span class="not-null">*</span>
										</td>
										<td>
											<input id="gbCode" type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.gbClassNo" />
                                            <input id="astClass" type="hidden" name="asset.astClass" />
										</td>
									</tr>
									<tr>
										<td >
											设备名称
											<span class="not-null">*</span>
										</td>
										<td>
											<input id="txtAstName" type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.astName" />
										</td>
									</tr>
									<tr>
										<td>数 &nbsp;&nbsp;&nbsp;&nbsp; 量
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.astCount" value="1" />
										</td>
									</tr>
									<tr>
										<td>单&nbsp;&nbsp;&nbsp;&nbsp; 价
											<span class="not-null">*</span>
										</td>
										<td>
											<input id="txtPrice" type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.price" value="0.00" />
										</td>
									</tr>
									<tr>
										<td>
											购置日期
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text" id="buyDate"
												class="ui-widget-content ui-corner-all txt"
												name="asset.buyDate" readonly="readonly"
												value="<s:date name="#request.nowDate"   format="yyyy-MM-dd"  />"  />
										</td>
									</tr>
									<tr>
										<td>
											品 &nbsp;&nbsp;&nbsp;&nbsp;牌
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.brand" />
										</td>
									</tr>
									<tr>
										<td>
											型号规格
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.modelNo" />
										</td>
									</tr>
									<tr>
										<td>
											存放地点<span class="not-null">*</span>
										</td>
										<td>
											<input id="txtStorage" type="text" name="txtStorageread"
												class="ui-widget-content ui-corner-all txt"  />
											<input id="txtCfddNo" type="hidden" name="asset.cfddNo" value="" />
											<input id="txtCfddName" type="hidden" name="asset.cfddName" value="" />
										</td>
									</tr>
									<tr>
										<td>
											厂 &nbsp;&nbsp;&nbsp;&nbsp;家
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.factoryName" />
										</td>
									</tr>
									<tr>
										<td>
											供 货 商
										</td>
										<td>
											<input type="text" id="supplier"
												class="ui-widget-content ui-corner-all txt"
												name="asset.suplierName" />
										</td>
									</tr>
									<tr>
										<td>
											折旧方式
										</td>
										<td>
											<select name="asset.zjfs">
												<s:iterator value="#request.zjfsList">
													<option value="<s:property value="fieldName4" />">
														<s:property value="txt" />
													</option>
												</s:iterator>
											</select>
										</td>
									</tr>
									 <tr>
										<td >
											使用年限
										</td>
										<td>
											<input id="txtUseYear" type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.useYear" />
										</td>
									</tr>
								</table>
							</div>
							<div class="panel right">
								<table>
									<tr>
										<td>
											单位名称
											<span class="not-null">*</span>
										</td>
										<td>
											<input id="deptName" type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.deptNo" />
										</td>
									</tr>
									<tr>
										<td>
											领 用 人
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text" id="collarName"
												class="ui-widget-content ui-corner-all txt"
												name="asset.collarName"
												value="" />
										</td>
									</tr>
									<tr>
										<td>
											经 手 人
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text" id="handName"
												class="ui-widget-content ui-corner-all txt"
												name="asset.handName"
												value="" />
										</td>
									</tr>
									<tr>
										<td>
											联系电话
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.telephoneNo" />
										</td>
									</tr>
									<tr>
										<td>
											核销科室
											<span class="not-null">*</span>
										</td>
										<td>
											<select  name="asset.finDeptName">
											   <option value="">--请选择--</option>
												<s:iterator value="#request.chargeOffDeptList">
													<option value="<s:property value="fieldName4" />">
														<s:property value="txt" />
													</option>
												</s:iterator>
											</select>

										</td>
									</tr>
									<tr>
										<td>
											发票图片
											<span class="not-null">*</span>
										</td>
										<td>
											<input type="file"
												class="ui-widget-content ui-corner-all txt" name="bill" />
										</td>
									</tr>
									<tr>
										<td>
											资产图片
											<span class="not-null">*</span>
										</td>
										<td>
											<span class="pic-box"><input type="file"
													class="ui-widget-content ui-corner-all txt" name="pic" /><a
												id="addFile" href="#">新增</a> </span>
										</td>
									</tr>
									<tr>
										<td>
											现&nbsp;&nbsp;&nbsp;&nbsp; 状
										</td>
										<td>
											<select name="asset.xz">
												<s:iterator value="#request.nowStatusList">
													<option value="<s:property value="fieldName4" />">
														<s:property value="txt" />
													</option>
												</s:iterator>
											</select>
										</td>
									</tr>
                                     <tr>
										<td>
											使用方向
										</td>
										<td>
											<select name="asset.syfx">
												<s:iterator value="#request.useDirList">
													<option value="<s:property value="fieldName4" />">
														<s:property value="txt" />
													</option>
												</s:iterator>
											</select>
										</td>
									</tr>
									<tr>
										<td>
											设备来源
										</td>
										<td>
											<select name="asset.zcly">
												<s:iterator value="#request.astSourceList">
													<option value="<s:property value="fieldName4" />">
														<s:property value="txt" />
													</option>
												</s:iterator>
											</select>
										</td>
									</tr>
									
									<!-- 
								<tr>
									<td>
										经费来源
									</td>
									<td>
										<select name="">
											<s:iterator value="#request.fundSubList">
												<option value="<s:property value="fieldName4" />">
													<s:property value="txt" />
												</option>
											</s:iterator>
										</select>
									</td>
								</tr>
								 -->
									<tr>
										<td>
											备 &nbsp;&nbsp;&nbsp;&nbsp;注
										</td>
										<td>
											<textarea rows="3" cols="" name="asset.remarks"
												class="ui-widget-content ui-corner-all txt"></textarea>
										</td>
									</tr>
								</table>

							</div>
						</div>
						<div class="btns-line">
							<a href="#" id="btnShow" class="btn-show"> </a>
						</div>
						<div id="pnlExpand" class="pnl-btm clearfix">
							<div class="panel left">
								<table>
									<tr>
										<td>
											计量单位
										</td>
										<td>
											<input id="txtJlUnit" type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.jlUnit" />
										</td>
									</tr>
									<tr>
										<td>
											出  厂  号
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.delyNo" value="*"/>
										</td>
									</tr>
									<tr>
										<td>
											出厂日期
										</td>
										<td>
											<input type="text" id="delyDate"
												class="ui-widget-content ui-corner-all txt"
												name="asset.delyDate" value="<s:date name="#request.nowDate"   format="yyyy-MM-dd"  />"  />
										</td>
									</tr>
									<tr>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='数字字段1'">
													<s:property value="newField.trim()" />
												</s:if>
											</s:iterator>
										</td>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='数字字段1'">
													<input type="text" name="asset.numField1"
														class="ui-widget-content u-corner-all txt"
														value="<s:property value="defaultVal" />" />
												</s:if>
											</s:iterator>
										</td>
									</tr>
									<tr>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='数字字段2'">
													<s:property value="newField.trim()" />
												</s:if>
											</s:iterator>
										</td>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='数字字段2'">
													<input type="text" name="asset.numField2"
														class="ui-widget-content u-corner-all txt"
														value="<s:property value="defaultVal" />" />
												</s:if>
											</s:iterator>
										</td>
									</tr>

								</table>
							</div>
							<div class="panel right">
								<table>
									<tr>
										<td>
											国 &nbsp;&nbsp;&nbsp;&nbsp;别
										</td>
										<td>
											<input id="nationCode" type="text"
												class="ui-widget-content ui-corner-all txt" value="(156)中国" />
											<input id="txtGBNo" type="hidden" name="asset.gbNo" value="156" />
											<input id="txtGBName" type="hidden" name="asset.gbName"
												value="中国" />
										</td>
									</tr>
									<tr>
										<td>
											外&nbsp;&nbsp;&nbsp;&nbsp;币
										</td>
										<td>
											<input type="text"
												class="ui-widget-content ui-corner-all txt"
												name="asset.wprice" value="0" />
										</td>
									</tr>
									<tr>
										<td>
											保修期限
										</td>
										<td>
											<input type="text" id="storeDate"
												class="ui-widget-content ui-corner-all txt"
												name="asset.storeDate" value="<s:date name="#request.nowDate"   format="yyyy-MM-dd"  />"  />
										</td>
									</tr>
                                   <tr>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='字符字段1'">
													<s:property value="newField.trim()" />
												</s:if>
											</s:iterator>
										</td>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='字符字段1'">
													<input type="text" name="asset.charField1"
														class="ui-widget-content u-corner-all txt"
														value="<s:property value="defaultVal" />" />
												</s:if>
											</s:iterator>
										</td>
									</tr>
									<tr>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='字符字段2'">
													<s:property value="newField.trim()" />
												</s:if>
											</s:iterator>
										</td>
										<td>
											<s:iterator value="#request.byglList">
												<s:if test="oldField.trim()=='字符字段2'">
													<input type="text" name="asset.charField2"
														class="ui-widget-content u-corner-all txt"
														value="<s:property value="defaultVal" />" />
												</s:if>
											</s:iterator>
										</td>
									</tr>
								</table>

							</div>
						</div>
						<div class="ast-foot">
							<input class="btnAst" type="submit" value="保存" />
							<input class="btnAst" type="reset" value="清空" />
						</div>
					</div>

				</form>
			</div>
		</div>

		<div id="dialogGoon" class="goon">
			<div class="ui-state-highlight ui-corner-all">
				<em class="ui-icon ui-icon-info"></em>
				<strong></strong><span>保存成功！</span>
			</div>
			<a class="btnAst" href="#">打印标签</a>
			<a id="astAddPrint" class="btnAst" href="#">打印验收单</a>
			<a id="btnOldNo" class="btnAst" href="#">使用单据号<b id="tipBillNo"></b>继续添加</a>
			<a id="btnNewNo" class="btnAst" href="#">使用新单据号继续添加</a>
			<a class="btnAst" href="<%=basePath%>asset/ast_findAstNotAduit.action">修改/查询</a>
		</div>
		<%@ include file="/html/custom/footer.jsp"%>
	</body>
</html>
